EhsEnforcement.Enforcement (ehs_enforcement v0.1.0)
The Enforcement domain for managing enforcement agencies, cases, notices, and related entities.
This domain uses Ash code interfaces. Generated functions are available for all resources.
Summary
Functions
Calls the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Batch find or create multiple legislation records.
Batch processing for creating multiple cases efficiently
Batch processing for creating multiple cases efficiently Raises any errors instead of returning them
Batch processing for creating multiple offences efficiently
Batch processing for creating multiple offences efficiently Raises any errors instead of returning them
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.approve_match
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.approve_match, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.bulk_create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.bulk_create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.bulk_create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.bulk_create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.create
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.create, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.destroy
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.destroy, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.flag_for_later
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.flag_for_later, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.get_current
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.get_current, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_case
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_case, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_notice
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_notice, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_reference
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_reference, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.by_date_range
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.by_date_range, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_model_version
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_model_version, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.high_confidence
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.high_confidence, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.high_quality
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.high_quality, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_type
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_type, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_year_range
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_year_range, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_case
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_case, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_legislation
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_legislation, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_notice
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_notice, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.with_fines
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.with_fines, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.recent
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.recent, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.recent
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.recent, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_enrichment
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_enrichment, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_section
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_section, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_user
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_user, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.needs_attention
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.needs_attention, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.pending_reviews
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.pending_reviews, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.refresh
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.refresh, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_offender
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_offender, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_status
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_status, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.reviewed_by_user
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.reviewed_by_user, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.search_title
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.search_title, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.search_description
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.search_description, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.search
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.search, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.skip_match
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.skip_match, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.sync_from_airtable
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.sync_from_airtable, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Agency.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.update_from_scraping
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Case.update_from_scraping, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Notice.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offence.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update_statistics
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update_statistics, returning a boolean.
See Ash.can?/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.update
See Ash.can/3 for more information
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.update, returning a boolean.
See Ash.can?/3 for more information
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Check which notice regulator_ids already exist in the database.
Clear all cached results. Useful when data is updated.
Cached count functions for dashboard metrics and pagination.
Monitored version of count_cases! that logs slow queries.
Monitored version of count_notices! that logs slow queries.
Monitored version of count_offenders! that logs slow queries.
Calls the create action on EhsEnforcement.Enforcement.Agency.
Calls the create action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Case.
Calls the create action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Enrichment.
Calls the create action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Legislation.
Calls the create action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Notice.
Calls the create action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Offence.
Calls the create action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.Offender.
Calls the create action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the create action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Calls the create action on EhsEnforcement.Enforcement.EnrichmentValidation.
Calls the create action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.Case.
Calls the destroy action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.Enrichment.
Calls the destroy action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.Legislation.
Calls the destroy action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.Notice.
Calls the destroy action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.Offence.
Calls the destroy action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation.
Calls the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Find offenders with duplicate company registration numbers.
Find or create legislation with deduplication logic.
Calls the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Creates a form for the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Batch processing for creating multiple cases efficiently
Batch processing for creating multiple offences efficiently
Creates a form for the create action on EhsEnforcement.Enforcement.Agency.
Creates a form for the create action on EhsEnforcement.Enforcement.Case.
Creates a form for the create action on EhsEnforcement.Enforcement.Enrichment.
Creates a form for the create action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the create action on EhsEnforcement.Enforcement.Notice.
Creates a form for the create action on EhsEnforcement.Enforcement.Offence.
Creates a form for the create action on EhsEnforcement.Enforcement.Offender.
Creates a form for the create action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the create action on EhsEnforcement.Enforcement.EnrichmentValidation.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Case.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Enrichment.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Notice.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Offence.
Creates a form for the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation.
Creates a form for the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Creates a form for the read action on EhsEnforcement.Enforcement.Case.
Get the most recent metrics for each time period
Creates a form for the read action on EhsEnforcement.Enforcement.Enrichment.
Find enrichment for a specific case
Find enrichment for a specific notice
Creates a form for the read action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the read action on EhsEnforcement.Enforcement.Notice.
Creates a form for the read action on EhsEnforcement.Enforcement.Offence.
Creates a form for the by_reference action on EhsEnforcement.Enforcement.Offence.
Creates a form for the read action on EhsEnforcement.Enforcement.Offender.
Creates a form for the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Creates a form for the read action on EhsEnforcement.Enforcement.Case.
Creates a form for the by_date_range action on EhsEnforcement.Enforcement.Case.
Creates a form for the read action on EhsEnforcement.Enforcement.Enrichment.
Find enrichments generated by a specific AI model version
Get enrichments with high confidence scores (all sections > 0.8)
Get validations with 4-5 star ratings
Creates a form for the read action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the by_type action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the by_year_range action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the read action on EhsEnforcement.Enforcement.Notice.
Creates a form for the read action on EhsEnforcement.Enforcement.Offence.
Creates a form for the by_case action on EhsEnforcement.Enforcement.Offence.
Creates a form for the by_legislation action on EhsEnforcement.Enforcement.Offence.
Creates a form for the by_notice action on EhsEnforcement.Enforcement.Offence.
Creates a form for the with_fines action on EhsEnforcement.Enforcement.Offence.
Creates a form for the read action on EhsEnforcement.Enforcement.Offender.
Get recently generated enrichments (last 30 days)
Get recent validations (last 30 days)
Creates a form for the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Get all validations for a specific enrichment
Get all validations for a specific section type
Get all validations performed by a specific user
Get validations with low ratings (1-2 stars) that need review
Creates a form for the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview.
Refresh metrics for a specific filter combination
Creates a form for the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the search_title action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the search_description action on EhsEnforcement.Enforcement.Offence.
Creates a form for the search action on EhsEnforcement.Enforcement.Offender.
Creates a form for the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Creates a form for the sync_from_airtable action on EhsEnforcement.Enforcement.Case.
Creates a form for the update action on EhsEnforcement.Enforcement.Agency.
Creates a form for the update action on EhsEnforcement.Enforcement.Case.
Creates a form for the update_from_scraping action on EhsEnforcement.Enforcement.Case.
Creates a form for the update action on EhsEnforcement.Enforcement.Enrichment.
Creates a form for the update action on EhsEnforcement.Enforcement.Legislation.
Creates a form for the update action on EhsEnforcement.Enforcement.Notice.
Creates a form for the update action on EhsEnforcement.Enforcement.Offence.
Creates a form for the update action on EhsEnforcement.Enforcement.Offender.
Creates a form for the update_statistics action on EhsEnforcement.Enforcement.Offender.
Creates a form for the update action on EhsEnforcement.Enforcement.EnrichmentValidation.
Perform fuzzy search across cases using pg_trgm trigram similarity.
Perform fuzzy search across notices using pg_trgm trigram similarity.
Perform fuzzy search across offenders using pg_trgm trigram similarity.
Calls the read action on EhsEnforcement.Enforcement.Agency.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Agency.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Case.
Calls the read action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Get the most recent metrics for each time period
Get the most recent metrics for each time period Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Enrichment.
Calls the read action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Find enrichment for a specific case
Find enrichment for a specific case Raises any errors instead of returning them
Find enrichment for a specific notice
Find enrichment for a specific notice Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Legislation.
Calls the read action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Get legislation statistics for monitoring duplicate prevention.
Calls the read action on EhsEnforcement.Enforcement.Notice.
Calls the read action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Offence.
Calls the read action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the by_reference action on EhsEnforcement.Enforcement.Offence.
Calls the by_reference action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Offender.
Calls the read action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Code Interface Functions
Get query performance statistics for monitoring dashboards. This could be extended to track metrics in ETS/database for reporting.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Initialize the cache table. Called during application startup.
Calls the read action on EhsEnforcement.Enforcement.Agency.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Case.
Calls the read action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the by_date_range action on EhsEnforcement.Enforcement.Case.
Calls the by_date_range action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Cached version of list_cases_with_filters! for frequently used filter combinations.
Monitored version of list_cases_with_filters! that logs slow queries.
Calls the read action on EhsEnforcement.Enforcement.Enrichment.
Calls the read action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Find enrichments generated by a specific AI model version
Find enrichments generated by a specific AI model version Raises any errors instead of returning them
Get enrichments with high confidence scores (all sections > 0.8)
Get enrichments with high confidence scores (all sections > 0.8) Raises any errors instead of returning them
Get validations with 4-5 star ratings
Get validations with 4-5 star ratings Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Legislation.
Calls the read action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the by_type action on EhsEnforcement.Enforcement.Legislation.
Calls the by_type action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the by_year_range action on EhsEnforcement.Enforcement.Legislation.
Calls the by_year_range action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Notice.
Calls the read action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Cached version of list_notices_with_filters! for frequently used filter combinations.
Monitored version of list_notices_with_filters! that logs slow queries.
Calls the read action on EhsEnforcement.Enforcement.Offence.
Calls the read action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the by_case action on EhsEnforcement.Enforcement.Offence.
Calls the by_case action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the by_legislation action on EhsEnforcement.Enforcement.Offence.
Calls the by_legislation action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the by_notice action on EhsEnforcement.Enforcement.Offence.
Calls the by_notice action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the with_fines action on EhsEnforcement.Enforcement.Offence.
Calls the with_fines action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.Offender.
Calls the read action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Cached version of list_offenders_with_filters! for frequently used filter combinations.
Monitored version of list_offenders_with_filters! that logs slow queries.
Get recently generated enrichments (last 30 days)
Get recently generated enrichments (last 30 days) Raises any errors instead of returning them
Get recent validations (last 30 days)
Get recent validations (last 30 days) Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Get all validations for a specific enrichment
Get all validations for a specific enrichment Raises any errors instead of returning them
Get all validations for a specific section type
Get all validations for a specific section type Raises any errors instead of returning them
Get all validations performed by a specific user
Get all validations performed by a specific user Raises any errors instead of returning them
Get validations with low ratings (1-2 stars) that need review
Get validations with low ratings (1-2 stars) that need review Raises any errors instead of returning them
Calls the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Preview what a merge operation would do before executing it.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Refresh metrics for a specific filter combination
Refresh metrics for a specific filter combination Raises any errors instead of returning them
Calls the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Calls the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Calls the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Search for existing legislation by title with fuzzy matching.
Calls the search_title action on EhsEnforcement.Enforcement.Legislation.
Calls the search_title action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the search_description action on EhsEnforcement.Enforcement.Offence.
Calls the search_description action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the search action on EhsEnforcement.Enforcement.Offender.
Calls the search action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Calls the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Calls the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Execute the merge operation to combine duplicate offenders.
Calls the sync_from_airtable action on EhsEnforcement.Enforcement.Case.
Calls the sync_from_airtable action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Agency.
Calls the update action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Case.
Calls the update action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the update_from_scraping action on EhsEnforcement.Enforcement.Case.
Calls the update_from_scraping action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Enrichment.
Calls the update action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Legislation.
Calls the update action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Notice.
Calls the update action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Offence.
Calls the update action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.Offender.
Calls the update action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Calls the update_statistics action on EhsEnforcement.Enforcement.Offender.
Calls the update_statistics action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Calls the update action on EhsEnforcement.Enforcement.EnrichmentValidation.
Calls the update action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Functions
Calls the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- reviewed_by_id
- selected_company_number - The company registration number selected by admin (only set when status = approved)
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- reviewed_by_id
- selected_company_number - The company registration number selected by admin (only set when status = approved)
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Batch find or create multiple legislation records.
Useful for processing multiple breaches or offences at once. Returns a map of original titles to legislation records.
Batch processing for creating multiple cases efficiently
Inputs
- batch_size
- cases_data
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Batch processing for creating multiple cases efficiently Raises any errors instead of returning them
Inputs
- batch_size
- cases_data
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Batch processing for creating multiple offences efficiently
Inputs
- case_id
- notice_id
- offences_data
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Batch processing for creating multiple offences efficiently Raises any errors instead of returning them
Inputs
- case_id
- notice_id
- offences_data
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
@spec can( action_or_query_or_changeset :: Ash.Query.t() | Ash.Changeset.t() | {Ash.Resource.t(), atom() | Ash.Resource.Actions.action()}, actor :: term(), opts :: Keyword.t() ) :: {:ok, boolean() | :maybe} | {:error, term()}
@spec can?( query_or_changeset_or_action :: Ash.Query.t() | Ash.Changeset.t() | {Ash.Resource.t(), atom() | Ash.Resource.Actions.action()}, actor :: term(), opts :: Keyword.t() ) :: boolean() | no_return()
can_approve_match(actor, record, reviewed_by_id, selected_company_number, params_or_opts \\ %{}, opts \\ [])
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.approve_match
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
can_approve_match?(actor, record, reviewed_by_id, selected_company_number, params_or_opts \\ %{}, opts \\ [])
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.approve_match, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.bulk_create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.bulk_create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.bulk_create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.bulk_create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.create
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.create, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.destroy
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.destroy, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.flag_for_later
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.flag_for_later, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.get_current
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.get_current, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_case
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_case, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_notice
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_notice, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_reference
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_reference, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.by_date_range
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.by_date_range, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_model_version
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.by_model_version, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.high_confidence
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.high_confidence, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.high_quality
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.high_quality, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_type
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_type, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_year_range
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.by_year_range, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_case
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_case, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_legislation
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_legislation, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_notice
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.by_notice, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.with_fines
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.with_fines, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.recent
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.recent, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.recent
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.recent, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_enrichment
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_enrichment, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_section
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_section, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_user
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.by_user, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.needs_attention
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.needs_attention, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.pending_reviews
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.pending_reviews, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.refresh
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Metrics.refresh, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_offender
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_offender, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_status
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.by_status, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.reviewed_by_user
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.reviewed_by_user, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.search_title
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.search_title, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.search_description
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.search_description, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.search
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.search, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.skip_match
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.OffenderMatchReview.skip_match, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.sync_from_airtable
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.sync_from_airtable, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Agency.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.update_from_scraping
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Case.update_from_scraping, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Enrichment.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Legislation.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Notice.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offence.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update_statistics
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.Offender.update_statistics, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.update
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
Runs authorization checks for EhsEnforcement.Enforcement.EnrichmentValidation.update, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value istrue.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Will overwrite any actor, tenant or context provided. SeeAsh.Contextfor more.:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.
changeset_to_approve_match(record, reviewed_by_id, selected_company_number, params_or_opts \\ %{}, opts \\ [])
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Check which notice regulator_ids already exist in the database.
Used for pre-filtering during EA enforcement notice scraping to skip existing records and only process new ones.
Parameters
regulator_ids- List of regulator_id strings to checkagency_code- Agency code atom (e.g., :environment_agency)actor- Optional actor for authorization (default: nil)
Returns
Map with existing and new regulator_id lists plus counts:
:existing- List of regulator_ids that already exist:new- List of regulator_ids that don't exist yet:total- Total count of regulator_ids checked:existing_count- Count of existing records:new_count- Count of new records
Examples
iex> check_existing_notice_regulator_ids(["EA-123", "EA-456", "EA-789"], :environment_agency)
%{
existing: ["EA-123", "EA-456"],
new: ["EA-789"],
total: 3,
existing_count: 2,
new_count: 1
}
Clear all cached results. Useful when data is updated.
Cached count functions for dashboard metrics and pagination.
Monitored version of count_cases! that logs slow queries.
Monitored version of count_notices! that logs slow queries.
Monitored version of count_offenders! that logs slow queries.
Calls the create action on EhsEnforcement.Enforcement.Agency.
Inputs
- code
- enabled
- name
- base_url
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Inputs
- code
- enabled
- name
- base_url
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Case.
Inputs
- last_synced_at
- ea_total_violation_count - Number of violations in EA case
- environmental_receptor - Environmental receptor affected: 'land', 'water', 'air'
- ea_event_reference - EA event ID (e.g., '205107')
- offence_action_type
- regulator_id - Unique ID from agency system (EA: ea_record_id, HSE: regulator case ID)
- offence_result
- offence_costs
- offence_breaches - Description of regulation breaches/violations
- offence_hearing_date
- agency_id
- agency_code
- regulator_url
- is_ea_multi_violation - True if EA case has multiple distinct violations
- environmental_impact - Environmental impact level: 'none', 'minor', 'major'
- url
- offence_action_date
- regulator_function
- case_reference - Agency's case reference number (e.g., EA 'Case Reference' field)
- related_cases
- offender_attrs
- offender_id
- offence_fine
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Inputs
- last_synced_at
- ea_total_violation_count - Number of violations in EA case
- environmental_receptor - Environmental receptor affected: 'land', 'water', 'air'
- ea_event_reference - EA event ID (e.g., '205107')
- offence_action_type
- regulator_id - Unique ID from agency system (EA: ea_record_id, HSE: regulator case ID)
- offence_result
- offence_costs
- offence_breaches - Description of regulation breaches/violations
- offence_hearing_date
- agency_id
- agency_code
- regulator_url
- is_ea_multi_violation - True if EA case has multiple distinct violations
- environmental_impact - Environmental impact level: 'none', 'minor', 'major'
- url
- offence_action_date
- regulator_function
- case_reference - Agency's case reference number (e.g., EA 'Case Reference' field)
- related_cases
- offender_attrs
- offender_id
- offence_fine
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Enrichment.
Inputs
- case_id
- notice_id
- model_version - AI model version used (e.g., 'gpt-4-turbo', 'claude-sonnet-3.5')
- generated_at - Timestamp when enrichment was generated
- regulation_links - AI-identified regulation references extracted from breach descriptions. Each entry contains: {act, section, relevance_score, summary}
- benchmark_analysis - Industry benchmark comparisons.
- For Cases: fine amount percentiles, average fines for similar violations
- For Notices: compliance timelines, notice escalation patterns
- confidence_scores - Confidence scores (0.0-1.0) for each AI-generated section: {regulation_links: 0.95, benchmark_accuracy: 0.87, pattern_detection: 0.82, ...}
- pattern_detection - Historical pattern analysis including:
- Similar cases/notices count
- Trend analysis (increasing/decreasing enforcement)
- Notable precedents
- Repeat offender patterns
- layperson_summary - Plain language summary (Grade 8-10 reading level) for non-technical users
- professional_summary - Technical summary for compliance officers and legal professionals
- auto_tags - AI-generated categorization tags (e.g., 'construction', 'fatal-accident', 'repeat-offender')
- processing_time_ms - Time taken to generate enrichment (milliseconds)
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Inputs
- case_id
- notice_id
- model_version - AI model version used (e.g., 'gpt-4-turbo', 'claude-sonnet-3.5')
- generated_at - Timestamp when enrichment was generated
- regulation_links - AI-identified regulation references extracted from breach descriptions. Each entry contains: {act, section, relevance_score, summary}
- benchmark_analysis - Industry benchmark comparisons.
- For Cases: fine amount percentiles, average fines for similar violations
- For Notices: compliance timelines, notice escalation patterns
- confidence_scores - Confidence scores (0.0-1.0) for each AI-generated section: {regulation_links: 0.95, benchmark_accuracy: 0.87, pattern_detection: 0.82, ...}
- pattern_detection - Historical pattern analysis including:
- Similar cases/notices count
- Trend analysis (increasing/decreasing enforcement)
- Notable precedents
- Repeat offender patterns
- layperson_summary - Plain language summary (Grade 8-10 reading level) for non-technical users
- professional_summary - Technical summary for compliance officers and legal professionals
- auto_tags - AI-generated categorization tags (e.g., 'construction', 'fatal-accident', 'repeat-offender')
- processing_time_ms - Time taken to generate enrichment (milliseconds)
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Legislation.
Inputs
- legislation_title - Full title of the legislation (e.g., 'Health and Safety at Work etc. Act')
- legislation_type - Type of legislation
- legislation_year - Year the legislation was enacted (e.g., 1974)
- legislation_number - Official number/chapter of the legislation (e.g., 33)
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Inputs
- legislation_title - Full title of the legislation (e.g., 'Health and Safety at Work etc. Act')
- legislation_type - Type of legislation
- legislation_year - Year the legislation was enacted (e.g., 1974)
- legislation_number - Official number/chapter of the legislation (e.g., 33)
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Notice.
Inputs
- notice_body
- airtable_id
- last_synced_at
- environmental_receptor
- operative_date
- offence_action_type
- regulator_id
- legal_section
- notice_date
- offence_breaches - Description of regulation breaches/violations
- agency_id
- agency_code
- environmental_impact
- legal_act
- url
- regulator_event_reference
- offence_action_date
- regulator_function
- offender_attrs
- offender_id
- compliance_date
- regulator_ref_number
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Inputs
- notice_body
- airtable_id
- last_synced_at
- environmental_receptor
- operative_date
- offence_action_type
- regulator_id
- legal_section
- notice_date
- offence_breaches - Description of regulation breaches/violations
- agency_id
- agency_code
- environmental_impact
- legal_act
- url
- regulator_event_reference
- offence_action_date
- regulator_function
- offender_attrs
- offender_id
- compliance_date
- regulator_ref_number
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Offence.
Inputs
- fine - Fine amount for this specific offence
- offence_description - Description of the specific breach or violation
- sequence_number - Order/sequence within parent case (for multi-violation EA cases)
- legislation_id
- legislation_part - Specific part, section, or regulation of the legislation (e.g., 'Section 33', 'Regulation 4')
- case_id
- notice_id
- offence_reference - External reference for the offence (e.g., EA case reference 'SW/A/2010/2051079/01')
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Inputs
- fine - Fine amount for this specific offence
- offence_description - Description of the specific breach or violation
- sequence_number - Order/sequence within parent case (for multi-violation EA cases)
- legislation_id
- legislation_part - Specific part, section, or regulation of the legislation (e.g., 'Section 33', 'Regulation 4')
- case_id
- notice_id
- offence_reference - External reference for the offence (e.g., EA case reference 'SW/A/2010/2051079/01')
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Offender.
Inputs
- last_seen_date
- local_authority
- industry_sectors - EA detailed industry sectors (e.g., ['Manufacturing - General Engineering'])
- town - Town from EA structured address (e.g., 'BARNSLEY')
- county - County from EA structured address (e.g., 'SOUTH YORKSHIRE')
- total_notices
- main_activity
- country
- industry
- company_registration_number - Companies House registration number (e.g., '04622955')
- total_fines
- first_seen_date
- name
- postcode
- business_type
- agencies
- sic_code
- total_cases
- address
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Inputs
- last_seen_date
- local_authority
- industry_sectors - EA detailed industry sectors (e.g., ['Manufacturing - General Engineering'])
- town - Town from EA structured address (e.g., 'BARNSLEY')
- county - County from EA structured address (e.g., 'SOUTH YORKSHIRE')
- total_notices
- main_activity
- country
- industry
- company_registration_number - Companies House registration number (e.g., '04622955')
- total_fines
- first_seen_date
- name
- postcode
- business_type
- agencies
- sic_code
- total_cases
- address
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.OffenderMatchReview.
Inputs
- status
- offender_id
- confidence_score - Highest similarity score from candidate companies (0.0-1.0)
- searched_at
- candidate_companies - Array of top 3 Companies House candidate matches. Each entry contains: company_number, company_name, company_status, company_type, address, similarity_score
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Inputs
- status
- offender_id
- confidence_score - Highest similarity score from candidate companies (0.0-1.0)
- searched_at
- candidate_companies - Array of top 3 Companies House candidate matches. Each entry contains: company_number, company_name, company_status, company_type, address, similarity_score
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.EnrichmentValidation.
Inputs
- section - Which enrichment section is being validated
- user_id
- enrichment_id
- validated_at - When this validation was performed
- rating - Accuracy rating (1-5 stars)
- corrections - Optional correction suggestions or detailed feedback from professional
- validation_notes - Internal notes about validation context (e.g., 'Validated during QA review')
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the create action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Inputs
- section - Which enrichment section is being validated
- user_id
- enrichment_id
- validated_at - When this validation was performed
- rating - Accuracy rating (1-5 stars)
- corrections - Optional correction suggestions or detailed feedback from professional
- validation_notes - Internal notes about validation context (e.g., 'Validated during QA review')
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Case.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Enrichment.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Legislation.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Notice.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Offence.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Options
:return_destroyed?(boolean/0) - If true, the destroyed record is included in the return result, e.g{:ok, destroyed}or{:ok, destroyed, notifications}The default value isfalse.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_destroy, if a query, list, or stream of inputs is provided.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is:atomic.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Find offenders with duplicate company registration numbers.
Returns grouped duplicates by company registration number.
Returns
List of maps with:
:company_number- The duplicated company registration number:offenders- List of offender records with this number:count- Number of duplicate records
Examples
iex> find_duplicate_offenders_by_company_number()
{:ok, [
%{company_number: "01999508", offenders: [offender1, offender2], count: 2},
%{company_number: "03353423", offenders: [offender3, offender4], count: 2}
]}
@spec find_or_create_legislation( String.t(), integer() | nil, integer() | nil, atom() | nil ) :: {:ok, struct()} | {:error, term()}
Find or create legislation with deduplication logic.
This function prevents duplicate legislation records by:
- Normalizing the title
- Searching for exact matches first
- Using fuzzy matching for similar titles
- Creating new records only when no match exists
Works for both HSE and EA legislation processing.
Parameters
title- The legislation title (required)year- The year enacted (optional, extracted from title if not provided)number- The legislation number (optional)type- The legislation type (optional, determined from title if not provided)
Examples
iex> find_or_create_legislation("Health and Safety at Work Act 1974", 1974, 37)
{:ok, %Legislation{legislation_title: "Health and Safety at Work etc. Act", ...}}
iex> find_or_create_legislation("COSHH REGULATIONS 2002")
{:ok, %Legislation{legislation_title: "Control of Substances Hazardous to Health Regulations", ...}}
Calls the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- reviewed_by_id
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- reviewed_by_id
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Creates a form for the approve_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Batch processing for creating multiple cases efficiently
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Batch processing for creating multiple offences efficiently
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Agency.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Enrichment.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Notice.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the create action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Enrichment.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Notice.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the destroy action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the flag_for_later action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get the most recent metrics for each time period
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Enrichment.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Find enrichment for a specific case
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Find enrichment for a specific notice
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Notice.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_reference action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Agency.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_date_range action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Enrichment.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Find enrichments generated by a specific AI model version
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get enrichments with high confidence scores (all sections > 0.8)
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get validations with 4-5 star ratings
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_type action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_year_range action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Notice.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_case action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_legislation action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_notice action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the with_fines action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get recently generated enrichments (last 30 days)
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get recent validations (last 30 days)
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get all validations for a specific enrichment
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get all validations for a specific section type
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get all validations performed by a specific user
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Get validations with low ratings (1-2 stars) that need review
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Refresh metrics for a specific filter combination
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the search_title action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the search_description action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the search action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the sync_from_airtable action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Agency.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update_from_scraping action on EhsEnforcement.Enforcement.Case.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Enrichment.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Legislation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Notice.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Offence.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update_statistics action on EhsEnforcement.Enforcement.Offender.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Creates a form for the update action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:actor(term/0) - The actor performing the action. Passed through to the underlying action.:scope(term/0) - A value that implements theAsh.Scopeprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scopefor more.:forms(keyword/0) - Nested form configurations. Seefor_create/3"Nested Form Options" docs for more.:warn_on_unhandled_errors?(boolean/0) - Warns on any errors that don't match the form pattern of{:field, "message", [replacement: :vars]}or implement theAshPhoenix.FormData.Errorprotocol. The default value istrue.:domain(atom/0) - The domain to use when calling the action.:as(String.t/0) - The name of the form in the submitted params. You will need to pull the form params out using this key. The default value is"form".:id(String.t/0) - The html id of the form. Defaults to the value of:asif provided, otherwise "form":transform_errors- Allows for manual manipulation and transformation of errors. You may preferpost_process_errorsas a simpler API.
If possible, try to implementAshPhoenix.FormData.Errorfor the error (if it as a custom one, for example). If that isn't possible, you can provide this function which will get the changeset and the error, and should return a list of ash phoenix formatted errors, e.g[{field :: atom, message :: String.t(), substituations :: Keyword.t()}]
Example:AshPhoenix.Form.for_create(..., transform_errors: fn _changeset, %{field: :field1} = error -> %{error | field: :field2} _changeset, error -> error end:post_process_errors- Allows for post-processing of errors after they have been converted to the standard triple format.
This function receives the form, the path to the form, and an error triple{field, message, vars}. It should return either a modified triple ornilto filter out the error.
This is useful for:- Filtering out certain errors based on custom criteria
- Remapping field names from one field to another
- Modifying error messages or variables
Example:AshPhoenix.Form.for_create(..., post_process_errors: fn form, _path, {field, message, vars} -> case field do :status -> # hide these errors nil field when field in [:currency, :amount] -> # remap the field, and replace the error message {:money, "please enter a real money amount", []} field -> # leave the others unchanged {field, message, vars} end end)
:prepare_source- A 1-argument function the receives the initial changeset (or query) and makes any relevant changes to it. This can be used to do things like:- Set default argument values before the validations are run using
Ash.Changeset.set_arguments/2orAsh.Changeset.set_argument/3 - Set changeset context
- Do any other pre-processing on the changeset
- Set default argument values before the validations are run using
:prepare_params- A 2-argument function that receives the params map and the :validate atom and should return prepared params. Called before the form is validated.:transform_params- A function for post-processing the form parameters before they are used for changeset validation/submission. Use a 3-argument function to pattern match on theAshPhoenix.Formstruct.:method(String.t/0) - The http method to associate with the form. Defaults topostfor creates, andputfor everything else.:exclude_fields_if_empty- These fields will be ignored if they are empty strings.
This list of fields supports dead view forms. When a form is submitted from dead view empty fields are submitted as empty strings. This is problematic for fields that allow_nil or those that have default values.:tenant(term/0) - The current tenant. Passed through to the underlying action.:params(term/0) - The initial parameters to use for the form. This is useful for setting up a form with default values. The default value is%{}. Any additional options will be passed to the underlying call to build the source, i.eAsh.ActionInput.for_action/4, orAsh.Changeset.for_*. This means you can set things like the tenant/actor. These will be retained, and provided again whenForm.submit/3is called.
Nested Form Options
:type- The cardinality of the nested form -:listor:single. Valid values are :list, :single The default value is:single.:sparse?(boolean/0) - If the nested form issparse, the form won't expect all inputs for all forms to be present.
Has no effect if the type is:single.
Normally, if you leave some forms out of a list of nested forms, they are removed from the parameters passed to the action. For example, if you had apostwith two comments[%Comment{id: 1}, %Comment{id: 2}]and you passed down params likecomments[0][id]=1&comments[1][text]=new_text, we would remove the second comment from the input parameters, resulting in the following being passed into the action:%{"comments" => [%{"id" => 1, "text" => "new"}]}. By setting it to sparse, you have to explicitly useremove_formfor that removal to happen. So in the same scenario above, the parameters that would be sent would actually be%{"comments" => [%{"id" => 1, "text" => "new"}, %{"id" => 2}]}.
One major difference withsparse?is that the form actually ignores the index provided, e.gcomments[0]..., and instead uses the primary key e.gcomments[0][id]to match which form is being updated. This prevents you from having to find the index of the specific item you want to update. Which could be very gnarly on deeply nested forms. If there is no primary key, or the primary key does not match anything, it is treated as a new form.
REMEMBER: You need to usePhoenix.Components.inputs_forto render the nested forms, or manually add hidden inputs usinghidden_inputs_for(orHiddenInputsif using Surface) for the id to be automatically placed into the form.:forms(keyword/0) - Forms nested inside the current nesting level in all cases.:for_type- What action types the form applies for. Leave blank for it to apply to all action types. Valid values are :read, :create, :update:merge?(boolean/0) - When building parameters, this input will be merged with its parent input. This allows for combining multiple forms into a single input. The default value isfalse.:for(atom/0) - When creating parameters for the action, the key that the forms should be gathered into. Defaults to the key used to configure the nested form. Ignored ifmerge?istrue.:resource(atom/0) - The resource of the nested forms. Unnecessary if you are providing thedatakey, and not adding additional forms to this path.:create_action(atom/0) - The create action to use when building new forms. Only necessary if you want to useadd_form/3with this path.:update_action(atom/0) - The update action to use when building forms for data. Only necessary if you supply thedatakey.:data(term/0) - The current value or values that should have update forms built by default.
You can also provide a single argument function that will return the data based on the data of the parent form. This is important for multiple nesting levels of:listtype forms, because the data depends on which parent is being rendered.
Perform fuzzy search across cases using pg_trgm trigram similarity.
This function uses PostgreSQL's pg_trgm extension to find cases with text fields that are similar to the search term, even with typos or partial matches.
Parameters
search_term- The text to search for (minimum 3 characters)opts- Additional query options (limit, offset, etc.)
Options
:similarity_threshold- Minimum similarity score (0.0-1.0, default: 0.3):limit- Maximum number of results to return:offset- Number of results to skip:load- Associations to preload
Examples
iex> fuzzy_search_cases("construction", limit: 10)
[%Case{regulator_id: "HSE-2024-123", computed_breaches_summary: "Construction (Design and Management) Regulations 2015"}]
iex> fuzzy_search_cases("acme corp", similarity_threshold: 0.4)
[%Case{offender: %{name: "ACME Construction Ltd"}}]
Perform fuzzy search across notices using pg_trgm trigram similarity.
Similar to fuzzy_search_cases/2 but searches notice fields including notice body.
Perform fuzzy search across offenders using pg_trgm trigram similarity.
Searches offender name, normalized name, local authority, and main activity fields.
Calls the read action on EhsEnforcement.Enforcement.Agency.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Agency.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Case.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get the most recent metrics for each time period
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get the most recent metrics for each time period Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Enrichment.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichment for a specific case
Arguments
- case_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichment for a specific case Raises any errors instead of returning them
Arguments
- case_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichment for a specific notice
Arguments
- notice_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichment for a specific notice Raises any errors instead of returning them
Arguments
- notice_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Legislation.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get legislation statistics for monitoring duplicate prevention.
Calls the read action on EhsEnforcement.Enforcement.Notice.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offence.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_reference action on EhsEnforcement.Enforcement.Offence.
Arguments
- offence_reference
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_reference action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Arguments
- offence_reference
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offender.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Code Interface Functions
This domain now uses Ash code interfaces. Use the generated functions instead of direct Ash calls:
Agency Functions
list_agencies/1- List all agencies with optionsget_agency/2- Get agency by IDcreate_agency/2- Create new agencyupdate_agency/3- Update existing agencyget_agency_by_code/2- Get agency by code
Offender Functions
list_offenders/1- List all offenders with basic options (code interface)list_offenders_with_filters/1- List offenders with complex filtering (custom function)list_offenders_with_filters_cached!/1- Cached version for performancelist_offenders_with_filters_monitored!/1- Monitored version with slow query loggingget_offender/2- Get offender by IDcreate_offender/2- Create new offenderupdate_offender/3- Update existing offendersearch_offenders/2- Search offenders with queryfuzzy_search_offenders/2- Fuzzy search using pg_trgm trigram similarityupdate_offender_statistics/3- Update offender statisticscount_offenders!/1- Count offenders with filteringcount_offenders_cached!/1- Cached count for performancecount_offenders_monitored!/1- Monitored count with logging
Case Functions
list_cases/1- List all cases with basic options (code interface)list_cases_with_filters/1- List cases with complex filtering (custom function)get_case/2- Get case by IDcreate_case/2- Create new caseupdate_case_from_scraping/3- Update case from HSE scrapingsync_case_from_airtable/3- Sync case from Airtable migrationdestroy_case/2- Delete caselist_cases_by_date_range/3- List cases in date rangebulk_create_cases/2- Bulk create multiple cases
Notice Functions
list_notices/1- List all notices with optionsget_notice/2- Get notice by IDcreate_notice/2- Create new noticeupdate_notice/3- Update existing noticedestroy_notice/2- Delete noticesync_notice/3- Sync notice data
Metrics Functions
get_current_metrics/1- Get current cached dashboard metricsrefresh_metrics/1- Refresh all dashboard metrics from current data
Legislation Functions
list_legislation/1- List all legislation with optionsget_legislation/2- Get legislation by IDcreate_legislation/2- Create new legislationupdate_legislation/3- Update existing legislationdestroy_legislation/2- Delete legislationlist_legislation_by_type/2- List legislation by type (act, regulation, etc.)list_legislation_by_year_range/3- List legislation within year rangesearch_legislation_title/2- Fuzzy search legislation titles
Offence Functions (Unified Violation/Breach Support)
list_offences/1- List all offences with optionsget_offence/2- Get offence by IDcreate_offence/2- Create new offenceupdate_offence/3- Update existing offencedestroy_offence/2- Delete offencelist_offences_by_case/2- List offences for specific caselist_offences_by_notice/2- List offences for specific noticelist_offences_by_legislation/2- List offences referencing specific legislationget_offence_by_reference/2- Get offence by reference IDlist_offences_with_fines/1- List offences that have associated finessearch_offence_description/2- Fuzzy search offence descriptionsbulk_create_offences/2- Bulk create multiple offences
Get query performance statistics for monitoring dashboards. This could be extended to track metrics in ETS/database for reporting.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Initialize the cache table. Called during application startup.
Calls the read action on EhsEnforcement.Enforcement.Agency.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Case.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_date_range action on EhsEnforcement.Enforcement.Case.
Arguments
- from_date
- to_date
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_date_range action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Arguments
- from_date
- to_date
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Cached version of list_cases_with_filters! for frequently used filter combinations.
Uses a simple cache key based on common filter patterns to avoid repeated database queries. Cache TTL is 300.0 seconds.
Monitored version of list_cases_with_filters! that logs slow queries.
Calls the read action on EhsEnforcement.Enforcement.Enrichment.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichments generated by a specific AI model version
Arguments
- model_version
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Find enrichments generated by a specific AI model version Raises any errors instead of returning them
Arguments
- model_version
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get enrichments with high confidence scores (all sections > 0.8)
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get enrichments with high confidence scores (all sections > 0.8) Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get validations with 4-5 star ratings
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get validations with 4-5 star ratings Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Legislation.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_type action on EhsEnforcement.Enforcement.Legislation.
Arguments
- legislation_type
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_type action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Arguments
- legislation_type
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_year_range action on EhsEnforcement.Enforcement.Legislation.
Arguments
- start_year
- end_year
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_year_range action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Arguments
- start_year
- end_year
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Notice.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Cached version of list_notices_with_filters! for frequently used filter combinations.
Monitored version of list_notices_with_filters! that logs slow queries.
Calls the read action on EhsEnforcement.Enforcement.Offence.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_case action on EhsEnforcement.Enforcement.Offence.
Arguments
- case_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_case action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Arguments
- case_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_legislation action on EhsEnforcement.Enforcement.Offence.
Arguments
- legislation_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_legislation action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Arguments
- legislation_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_notice action on EhsEnforcement.Enforcement.Offence.
Arguments
- notice_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_notice action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Arguments
- notice_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the with_fines action on EhsEnforcement.Enforcement.Offence.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the with_fines action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offender.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Cached version of list_offenders_with_filters! for frequently used filter combinations.
Monitored version of list_offenders_with_filters! that logs slow queries.
Get recently generated enrichments (last 30 days)
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get recently generated enrichments (last 30 days) Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get recent validations (last 30 days)
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get recent validations (last 30 days) Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the read action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations for a specific enrichment
Arguments
- enrichment_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations for a specific enrichment Raises any errors instead of returning them
Arguments
- enrichment_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations for a specific section type
Arguments
- section
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations for a specific section type Raises any errors instead of returning them
Arguments
- section
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations performed by a specific user
Arguments
- user_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get all validations performed by a specific user Raises any errors instead of returning them
Arguments
- user_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get validations with low ratings (1-2 stars) that need review
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Get validations with low ratings (1-2 stars) that need review Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview.
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the pending_reviews action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Preview what a merge operation would do before executing it.
Validates offender against Companies House and returns preview data showing:
- Companies House validation results
- Data that would be applied to master
- Statistics after merge
- Records that would be deleted
Parameters
master_id- UUID of the offender to keep (master record)duplicate_ids- List of UUIDs of offenders to merge into master
Returns
{:ok, preview_map} with:
:validation- %{valid: bool, similarity: float, canonical_name: string, status: string}:companies_house_data- %{name:, address:, town:, county:, postcode:}:merge_preview- %{total_cases:, total_notices:, total_fines:, agencies:, industry_sectors:}:duplicates_info- List of %{id:, name:, location:, cases:, notices:} for records to be deleted
Examples
iex> preview_offender_merge(master_id, [duplicate_id])
{:ok, %{
validation: %{valid: true, similarity: 1.0, canonical_name: "...", status: "active"},
companies_house_data: %{name: "...", address: "...", ...},
merge_preview: %{total_cases: 5, total_notices: 3, total_fines: #Decimal<57000>},
duplicates_info: [%{id: "...", name: "...", location: "...", cases: 2, notices: 1}]
}}
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Refresh metrics for a specific filter combination
Inputs
- total_notices_count - Total number of notices (all time)
- total_fines_amount - Total fines from cases within the time period
- recent_activity - Top 100 recent cases/notices matching this filter combination for instant display
- period_label - Human readable period label (e.g., 'Last 30 Days')
- recent_notices_count - Number of notices within the time period
- period - Time period for the metrics (week, month, or year)
- days_ago - Number of days back from today for the period
- record_type - Record type filter (NULL = combined cases + notices)
- cutoff_date - The cutoff date used for recent data filtering
- legislation_id - Legislation filter for future legislation-specific metrics (currently unused)
- agency_id - Agency filter (NULL = all agencies combined)
- agency_stats - Per-agency statistics with enhanced breakdown for dashboard dropdown filtering
- total_costs_amount - Total costs awarded in cases within the time period
- total_offences_count - Total number of offences within the time period
- recent_cases_count - Number of cases within the time period
- calculated_by - Whether metrics were calculated manually by admin or via automation
- legislation_breakdown - Top breached legislation with counts (legislation_id => %{title, breach_count, ...})
- offender_breakdown - Top offenders with statistics (offender_id => %{name, cases, fines, ...})
- total_cases_count - Total number of cases (all time)
- active_agencies_count - Number of enabled agencies
- offender_id - Offender filter for future offender-specific metrics (currently unused)
- calculated_at - When these metrics were calculated
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Refresh metrics for a specific filter combination Raises any errors instead of returning them
Inputs
- total_notices_count - Total number of notices (all time)
- total_fines_amount - Total fines from cases within the time period
- recent_activity - Top 100 recent cases/notices matching this filter combination for instant display
- period_label - Human readable period label (e.g., 'Last 30 Days')
- recent_notices_count - Number of notices within the time period
- period - Time period for the metrics (week, month, or year)
- days_ago - Number of days back from today for the period
- record_type - Record type filter (NULL = combined cases + notices)
- cutoff_date - The cutoff date used for recent data filtering
- legislation_id - Legislation filter for future legislation-specific metrics (currently unused)
- agency_id - Agency filter (NULL = all agencies combined)
- agency_stats - Per-agency statistics with enhanced breakdown for dashboard dropdown filtering
- total_costs_amount - Total costs awarded in cases within the time period
- total_offences_count - Total number of offences within the time period
- recent_cases_count - Number of cases within the time period
- calculated_by - Whether metrics were calculated manually by admin or via automation
- legislation_breakdown - Top breached legislation with counts (legislation_id => %{title, breach_count, ...})
- offender_breakdown - Top offenders with statistics (offender_id => %{name, cases, fines, ...})
- total_cases_count - Total number of cases (all time)
- active_agencies_count - Number of enabled agencies
- offender_id - Offender filter for future offender-specific metrics (currently unused)
- calculated_at - When these metrics were calculated
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis not provided:upsert_fields- The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.:upsert_condition(term/0) - An expression to check if the record should be updated when there's a conflict.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:after_action(function of arity 2) - An after_action hook to be added to each processed changeset:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- offender_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_offender action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- offender_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- status
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the by_status action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- status
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- user_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the reviewed_by_user action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- user_id
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Search for existing legislation by title with fuzzy matching.
Useful for manual deduplication or verification.
Calls the search_title action on EhsEnforcement.Enforcement.Legislation.
Arguments
- search_term
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the search_title action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Arguments
- search_term
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the search_description action on EhsEnforcement.Enforcement.Offence.
Arguments
- search_term
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the search_description action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Arguments
- search_term
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the search action on EhsEnforcement.Enforcement.Offender.
Arguments
- query
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the search action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Arguments
- query
Options
:page- Pagination options, seeAsh.read/2for more.:load(term/0) - A load statement to add onto the query:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element.
The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is:filter.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis given:batch_size(integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Calls the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview.
Arguments
- reviewed_by_id
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the skip_match action on EhsEnforcement.Enforcement.OffenderMatchReview. Raises any errors instead of returning them
Arguments
- reviewed_by_id
Inputs
- review_notes - Optional notes from admin about the review decision
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Execute the merge operation to combine duplicate offenders.
Calls the sync_and_merge_duplicates Ash action on the master record.
Parameters
master_id- UUID of the offender to keepduplicate_ids- List of UUIDs of offenders to merge and delete
Returns
{:ok, merged_offender}- Successfully merged offender with updated data{:error, reason}- Merge failed (transaction rolled back)
Examples
iex> sync_and_merge_offenders(master_id, [duplicate_id1, duplicate_id2])
{:ok, %Offender{name: "WRG WASTE SERVICES LIMITED", total_cases: 5, ...}}
Calls the sync_from_airtable action on EhsEnforcement.Enforcement.Case.
Inputs
- url
- offence_hearing_date
- offence_result
- offence_fine
- offence_costs
- related_cases
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the sync_from_airtable action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Inputs
- url
- offence_hearing_date
- offence_result
- offence_fine
- offence_costs
- related_cases
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Agency.
Inputs
- enabled
- name
- base_url
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Agency. Raises any errors instead of returning them
Inputs
- enabled
- name
- base_url
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Case.
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update_from_scraping action on EhsEnforcement.Enforcement.Case.
Inputs
- url
- offence_hearing_date
- offence_result
- offence_fine
- offence_costs
- related_cases
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update_from_scraping action on EhsEnforcement.Enforcement.Case. Raises any errors instead of returning them
Inputs
- url
- offence_hearing_date
- offence_result
- offence_fine
- offence_costs
- related_cases
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Enrichment.
Inputs
- regulation_links - AI-identified regulation references extracted from breach descriptions. Each entry contains: {act, section, relevance_score, summary}
- benchmark_analysis - Industry benchmark comparisons.
- For Cases: fine amount percentiles, average fines for similar violations
- For Notices: compliance timelines, notice escalation patterns
- confidence_scores - Confidence scores (0.0-1.0) for each AI-generated section: {regulation_links: 0.95, benchmark_accuracy: 0.87, pattern_detection: 0.82, ...}
- pattern_detection - Historical pattern analysis including:
- Similar cases/notices count
- Trend analysis (increasing/decreasing enforcement)
- Notable precedents
- Repeat offender patterns
- layperson_summary - Plain language summary (Grade 8-10 reading level) for non-technical users
- professional_summary - Technical summary for compliance officers and legal professionals
- auto_tags - AI-generated categorization tags (e.g., 'construction', 'fatal-accident', 'repeat-offender')
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Enrichment. Raises any errors instead of returning them
Inputs
- regulation_links - AI-identified regulation references extracted from breach descriptions. Each entry contains: {act, section, relevance_score, summary}
- benchmark_analysis - Industry benchmark comparisons.
- For Cases: fine amount percentiles, average fines for similar violations
- For Notices: compliance timelines, notice escalation patterns
- confidence_scores - Confidence scores (0.0-1.0) for each AI-generated section: {regulation_links: 0.95, benchmark_accuracy: 0.87, pattern_detection: 0.82, ...}
- pattern_detection - Historical pattern analysis including:
- Similar cases/notices count
- Trend analysis (increasing/decreasing enforcement)
- Notable precedents
- Repeat offender patterns
- layperson_summary - Plain language summary (Grade 8-10 reading level) for non-technical users
- professional_summary - Technical summary for compliance officers and legal professionals
- auto_tags - AI-generated categorization tags (e.g., 'construction', 'fatal-accident', 'repeat-offender')
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Legislation.
Inputs
- legislation_title - Full title of the legislation (e.g., 'Health and Safety at Work etc. Act')
- legislation_type - Type of legislation
- legislation_year - Year the legislation was enacted (e.g., 1974)
- legislation_number - Official number/chapter of the legislation (e.g., 33)
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Legislation. Raises any errors instead of returning them
Inputs
- legislation_title - Full title of the legislation (e.g., 'Health and Safety at Work etc. Act')
- legislation_type - Type of legislation
- legislation_year - Year the legislation was enacted (e.g., 1974)
- legislation_number - Official number/chapter of the legislation (e.g., 33)
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Notice.
Inputs
- notice_body
- airtable_id
- last_synced_at
- environmental_receptor
- operative_date
- offence_action_type
- regulator_id
- legal_section
- notice_date
- offence_breaches - Description of regulation breaches/violations
- environmental_impact
- legal_act
- url
- regulator_event_reference
- offence_action_date
- regulator_function
- compliance_date
- regulator_ref_number
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Notice. Raises any errors instead of returning them
Inputs
- notice_body
- airtable_id
- last_synced_at
- environmental_receptor
- operative_date
- offence_action_type
- regulator_id
- legal_section
- notice_date
- offence_breaches - Description of regulation breaches/violations
- environmental_impact
- legal_act
- url
- regulator_event_reference
- offence_action_date
- regulator_function
- compliance_date
- regulator_ref_number
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Offence.
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Offence. Raises any errors instead of returning them
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Offender.
Inputs
- name
- address
- local_authority
- main_activity
- industry
- business_type
- agencies
- sic_code
- country
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Inputs
- name
- address
- local_authority
- main_activity
- industry
- business_type
- agencies
- sic_code
- country
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update_statistics action on EhsEnforcement.Enforcement.Offender.
Inputs
- fine_amount
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update_statistics action on EhsEnforcement.Enforcement.Offender. Raises any errors instead of returning them
Inputs
- fine_amount
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.EnrichmentValidation.
Inputs
- rating - Accuracy rating (1-5 stars)
- corrections - Optional correction suggestions or detailed feedback from professional
- validation_notes - Internal notes about validation context (e.g., 'Validated during QA review')
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Calls the update action on EhsEnforcement.Enforcement.EnrichmentValidation. Raises any errors instead of returning them
Inputs
- rating - Accuracy rating (1-5 stars)
- corrections - Optional correction suggestions or detailed feedback from professional
- validation_notes - Internal notes about validation context (e.g., 'Validated during QA review')
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:return_notifications?(boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}(or{:ok, notifications})
To send notifications later, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value istrue.:notification_metadata(term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is%{}.:skip_unknown_inputs- A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use:*to indicate all unknown keys.:load(term/0) - A load statement to add onto the changeset:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for more.:stream_batch_size(integer/0) - Batch size to use if provided a query and the query must be streamed:allow_stream_with- The 'worst' strategy allowed to be used to fetch records if the:streamstrategy is chosen. See theAsh.stream!/2docs for more. The default value is:keyset.:authorize_query?(boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:filter(term/0) - A filter to apply to records. This is also applied to a stream of inputs.:strategy- The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is[:atomic].:allow_stream_with- The 'worst' strategy allowed to be used to fetch records. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.:max_concurrency(non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, the query that was ultimately used is returned as a third tuple element. The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value isfalse.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching. SeeAsh.Query.load/2. The default value isfalse.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_records?is not true.:authorize_query_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif not set.:authorize_with- If set to:error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is:filter.:private_arguments(map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is%{}.:sorted?(boolean/0) - Whether or not to sort results by their input position, in cases wherereturn_records?: truewas provided. The default value isfalse.:return_records?(boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value isfalse.:return_errors?(boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of:bulk_actions_default_to_errors?in your config, orfalseif not set. Returning all errors may be expensive for large inserts. The default value isfalse.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned. Potential elements:{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{:error, error}- an error that occurred. May be changeset or an individual error. The default value isfalse.:return_nothing?(boolean/0) - Mutes warnings about returning nothing. Only relevant ifreturn_stream?is set totrueand all otherreturn_*?options are set tofalse. The default value isfalse.:stop_on_error?(boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value isfalse.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen the data layer must return the results from each batch. This may be intensive for large bulk actions. Notifications will be automatically sent unlessreturn_notifications?is set totrue. The default value isfalse.:transaction- Whether or not to wrap the entire execution in a transaction, each batch, or not at all. Keep in mind:before_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :all. The default value is:batch.:max_concurrency(non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.